\(\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx\) [98]
Optimal result
Integrand size = 20, antiderivative size = 333 \[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {24 d^4 \cos (a+b x)}{b^5}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )}{b^5}-\frac {24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )}{b^5}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}
\]
[Out]
-2*(d*x+c)^4*arctanh(exp(I*(b*x+a)))/b+24*d^4*cos(b*x+a)/b^5-12*d^2*(d*x+c)^2*cos(b*x+a)/b^3+(d*x+c)^4*cos(b*x
+a)/b+4*I*d*(d*x+c)^3*polylog(2,-exp(I*(b*x+a)))/b^2-4*I*d*(d*x+c)^3*polylog(2,exp(I*(b*x+a)))/b^2-12*d^2*(d*x
+c)^2*polylog(3,-exp(I*(b*x+a)))/b^3+12*d^2*(d*x+c)^2*polylog(3,exp(I*(b*x+a)))/b^3-24*I*d^3*(d*x+c)*polylog(4
,-exp(I*(b*x+a)))/b^4+24*I*d^3*(d*x+c)*polylog(4,exp(I*(b*x+a)))/b^4+24*d^4*polylog(5,-exp(I*(b*x+a)))/b^5-24*
d^4*polylog(5,exp(I*(b*x+a)))/b^5+24*d^3*(d*x+c)*sin(b*x+a)/b^4-4*d*(d*x+c)^3*sin(b*x+a)/b^2
Rubi [A] (verified)
Time = 0.37 (sec) , antiderivative size = 333, normalized size of antiderivative = 1.00, number of
steps used = 17, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4493, 3377, 2718, 4268, 2611,
6744, 2320, 6724} \[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )}{b^5}-\frac {24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )}{b^5}+\frac {24 d^4 \cos (a+b x)}{b^5}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}+\frac {(c+d x)^4 \cos (a+b x)}{b}
\]
[In]
Int[(c + d*x)^4*Cos[a + b*x]*Cot[a + b*x],x]
[Out]
(-2*(c + d*x)^4*ArcTanh[E^(I*(a + b*x))])/b + (24*d^4*Cos[a + b*x])/b^5 - (12*d^2*(c + d*x)^2*Cos[a + b*x])/b^
3 + ((c + d*x)^4*Cos[a + b*x])/b + ((4*I)*d*(c + d*x)^3*PolyLog[2, -E^(I*(a + b*x))])/b^2 - ((4*I)*d*(c + d*x)
^3*PolyLog[2, E^(I*(a + b*x))])/b^2 - (12*d^2*(c + d*x)^2*PolyLog[3, -E^(I*(a + b*x))])/b^3 + (12*d^2*(c + d*x
)^2*PolyLog[3, E^(I*(a + b*x))])/b^3 - ((24*I)*d^3*(c + d*x)*PolyLog[4, -E^(I*(a + b*x))])/b^4 + ((24*I)*d^3*(
c + d*x)*PolyLog[4, E^(I*(a + b*x))])/b^4 + (24*d^4*PolyLog[5, -E^(I*(a + b*x))])/b^5 - (24*d^4*PolyLog[5, E^(
I*(a + b*x))])/b^5 + (24*d^3*(c + d*x)*Sin[a + b*x])/b^4 - (4*d*(c + d*x)^3*Sin[a + b*x])/b^2
Rule 2320
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]
Rule 2611
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]
Rule 2718
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Rule 3377
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rule 4268
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*
x))]/f), x] + (-Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[d*(m/f), Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]
Rule 4493
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Int[
(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^(p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x]
/; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
Rule 6724
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rule 6744
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(p_.)], x_Symbol] :> Simp
[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Dist[f*(m/(b*c*p*Log[F])), Int[(e +
f*x)^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c, d, e, f, n, p}, x] && GtQ[m,
0]
Rubi steps \begin{align*}
\text {integral}& = \int (c+d x)^4 \csc (a+b x) \, dx-\int (c+d x)^4 \sin (a+b x) \, dx \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}-\frac {(4 d) \int (c+d x)^3 \cos (a+b x) \, dx}{b}-\frac {(4 d) \int (c+d x)^3 \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {(4 d) \int (c+d x)^3 \log \left (1+e^{i (a+b x)}\right ) \, dx}{b} \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}-\frac {\left (12 i d^2\right ) \int (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (12 i d^2\right ) \int (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (12 d^2\right ) \int (c+d x)^2 \sin (a+b x) \, dx}{b^2} \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}+\frac {\left (24 d^3\right ) \int (c+d x) \cos (a+b x) \, dx}{b^3}+\frac {\left (24 d^3\right ) \int (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right ) \, dx}{b^3}-\frac {\left (24 d^3\right ) \int (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right ) \, dx}{b^3} \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}+\frac {\left (24 i d^4\right ) \int \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right ) \, dx}{b^4}-\frac {\left (24 i d^4\right ) \int \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right ) \, dx}{b^4}-\frac {\left (24 d^4\right ) \int \sin (a+b x) \, dx}{b^4} \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {24 d^4 \cos (a+b x)}{b^5}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2}+\frac {\left (24 d^4\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^5}-\frac {\left (24 d^4\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^5} \\ & = -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {24 d^4 \cos (a+b x)}{b^5}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )}{b^5}-\frac {24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )}{b^5}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2} \\
\end{align*}
Mathematica [B] (verified)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of
optimal. \(837\) vs. \(2(333)=666\).
Time = 1.33 (sec) , antiderivative size = 837, normalized size of antiderivative = 2.51
\[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\frac {b^4 c^4 \cos (a+b x)-12 b^2 c^2 d^2 \cos (a+b x)+24 d^4 \cos (a+b x)+4 b^4 c^3 d x \cos (a+b x)-24 b^2 c d^3 x \cos (a+b x)+6 b^4 c^2 d^2 x^2 \cos (a+b x)-12 b^2 d^4 x^2 \cos (a+b x)+4 b^4 c d^3 x^3 \cos (a+b x)+b^4 d^4 x^4 \cos (a+b x)+b^4 c^4 \log \left (1-e^{i (a+b x)}\right )+4 b^4 c^3 d x \log \left (1-e^{i (a+b x)}\right )+6 b^4 c^2 d^2 x^2 \log \left (1-e^{i (a+b x)}\right )+4 b^4 c d^3 x^3 \log \left (1-e^{i (a+b x)}\right )+b^4 d^4 x^4 \log \left (1-e^{i (a+b x)}\right )-b^4 c^4 \log \left (1+e^{i (a+b x)}\right )-4 b^4 c^3 d x \log \left (1+e^{i (a+b x)}\right )-6 b^4 c^2 d^2 x^2 \log \left (1+e^{i (a+b x)}\right )-4 b^4 c d^3 x^3 \log \left (1+e^{i (a+b x)}\right )-b^4 d^4 x^4 \log \left (1+e^{i (a+b x)}\right )+4 i b^3 d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-4 i b^3 d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )-12 b^2 c^2 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )-24 b^2 c d^3 x \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )-12 b^2 d^4 x^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )+12 b^2 c^2 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+24 b^2 c d^3 x \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+12 b^2 d^4 x^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )-24 i b c d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )-24 i b d^4 x \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )+24 i b c d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )+24 i b d^4 x \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )+24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )-24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )-4 b^3 c^3 d \sin (a+b x)+24 b c d^3 \sin (a+b x)-12 b^3 c^2 d^2 x \sin (a+b x)+24 b d^4 x \sin (a+b x)-12 b^3 c d^3 x^2 \sin (a+b x)-4 b^3 d^4 x^3 \sin (a+b x)}{b^5}
\]
[In]
Integrate[(c + d*x)^4*Cos[a + b*x]*Cot[a + b*x],x]
[Out]
(b^4*c^4*Cos[a + b*x] - 12*b^2*c^2*d^2*Cos[a + b*x] + 24*d^4*Cos[a + b*x] + 4*b^4*c^3*d*x*Cos[a + b*x] - 24*b^
2*c*d^3*x*Cos[a + b*x] + 6*b^4*c^2*d^2*x^2*Cos[a + b*x] - 12*b^2*d^4*x^2*Cos[a + b*x] + 4*b^4*c*d^3*x^3*Cos[a
+ b*x] + b^4*d^4*x^4*Cos[a + b*x] + b^4*c^4*Log[1 - E^(I*(a + b*x))] + 4*b^4*c^3*d*x*Log[1 - E^(I*(a + b*x))]
+ 6*b^4*c^2*d^2*x^2*Log[1 - E^(I*(a + b*x))] + 4*b^4*c*d^3*x^3*Log[1 - E^(I*(a + b*x))] + b^4*d^4*x^4*Log[1 -
E^(I*(a + b*x))] - b^4*c^4*Log[1 + E^(I*(a + b*x))] - 4*b^4*c^3*d*x*Log[1 + E^(I*(a + b*x))] - 6*b^4*c^2*d^2*x
^2*Log[1 + E^(I*(a + b*x))] - 4*b^4*c*d^3*x^3*Log[1 + E^(I*(a + b*x))] - b^4*d^4*x^4*Log[1 + E^(I*(a + b*x))]
+ (4*I)*b^3*d*(c + d*x)^3*PolyLog[2, -E^(I*(a + b*x))] - (4*I)*b^3*d*(c + d*x)^3*PolyLog[2, E^(I*(a + b*x))] -
12*b^2*c^2*d^2*PolyLog[3, -E^(I*(a + b*x))] - 24*b^2*c*d^3*x*PolyLog[3, -E^(I*(a + b*x))] - 12*b^2*d^4*x^2*Po
lyLog[3, -E^(I*(a + b*x))] + 12*b^2*c^2*d^2*PolyLog[3, E^(I*(a + b*x))] + 24*b^2*c*d^3*x*PolyLog[3, E^(I*(a +
b*x))] + 12*b^2*d^4*x^2*PolyLog[3, E^(I*(a + b*x))] - (24*I)*b*c*d^3*PolyLog[4, -E^(I*(a + b*x))] - (24*I)*b*d
^4*x*PolyLog[4, -E^(I*(a + b*x))] + (24*I)*b*c*d^3*PolyLog[4, E^(I*(a + b*x))] + (24*I)*b*d^4*x*PolyLog[4, E^(
I*(a + b*x))] + 24*d^4*PolyLog[5, -E^(I*(a + b*x))] - 24*d^4*PolyLog[5, E^(I*(a + b*x))] - 4*b^3*c^3*d*Sin[a +
b*x] + 24*b*c*d^3*Sin[a + b*x] - 12*b^3*c^2*d^2*x*Sin[a + b*x] + 24*b*d^4*x*Sin[a + b*x] - 12*b^3*c*d^3*x^2*S
in[a + b*x] - 4*b^3*d^4*x^3*Sin[a + b*x])/b^5
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1294 vs. \(2 (311 ) = 622\).
Time = 2.60 (sec) , antiderivative size = 1295, normalized size of antiderivative =
3.89
| | |
method | result | size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(1295\) |
| | |
|
|
|
[In]
int((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x,method=_RETURNVERBOSE)
[Out]
1/2*(d^4*x^4*b^4+4*b^4*c*d^3*x^3+6*b^4*c^2*d^2*x^2+4*b^4*c^3*d*x+4*I*b^3*d^4*x^3+b^4*c^4-12*b^2*d^4*x^2+12*I*b
^3*c*d^3*x^2-24*b^2*c*d^3*x+12*I*b^3*c^2*d^2*x-12*b^2*c^2*d^2+4*I*b^3*c^3*d-24*I*b*d^4*x+24*d^4-24*I*b*c*d^3)/
b^5*exp(I*(b*x+a))+1/2*(d^4*x^4*b^4+4*b^4*c*d^3*x^3+6*b^4*c^2*d^2*x^2+4*b^4*c^3*d*x-4*I*b^3*d^4*x^3+b^4*c^4-12
*b^2*d^4*x^2-12*I*b^3*c*d^3*x^2-24*b^2*c*d^3*x-12*I*b^3*c^2*d^2*x-12*b^2*c^2*d^2-4*I*b^3*c^3*d+24*I*b*d^4*x+24
*d^4+24*I*b*c*d^3)/b^5*exp(-I*(b*x+a))-2/b*c^4*arctanh(exp(I*(b*x+a)))-12/b^3*c^2*d^2*a^2*arctanh(exp(I*(b*x+a
)))+8/b^2*c^3*d*a*arctanh(exp(I*(b*x+a)))-24/b^3*c*d^3*polylog(3,-exp(I*(b*x+a)))*x-4/b^4*c*d^3*ln(exp(I*(b*x+
a))+1)*a^3+4/b^4*c*d^3*ln(1-exp(I*(b*x+a)))*a^3-6/b^3*d^2*c^2*ln(1-exp(I*(b*x+a)))*a^2+6/b^3*d^2*c^2*ln(exp(I*
(b*x+a))+1)*a^2+4/b^2*c^3*d*ln(1-exp(I*(b*x+a)))*a-4/b^2*c^3*d*ln(exp(I*(b*x+a))+1)*a+4/b*c*d^3*ln(1-exp(I*(b*
x+a)))*x^3-4/b*c*d^3*ln(exp(I*(b*x+a))+1)*x^3+6/b*d^2*c^2*ln(1-exp(I*(b*x+a)))*x^2-6/b*d^2*c^2*ln(exp(I*(b*x+a
))+1)*x^2+4/b*c^3*d*ln(1-exp(I*(b*x+a)))*x-4/b*c^3*d*ln(exp(I*(b*x+a))+1)*x+24*I/b^4*d^4*polylog(4,exp(I*(b*x+
a)))*x+24*I/b^4*c*d^3*polylog(4,exp(I*(b*x+a)))-24*I/b^4*c*d^3*polylog(4,-exp(I*(b*x+a)))-4*I/b^2*c^3*d*polylo
g(2,exp(I*(b*x+a)))-24*I/b^4*d^4*polylog(4,-exp(I*(b*x+a)))*x+4*I/b^2*d^4*polylog(2,-exp(I*(b*x+a)))*x^3-4*I/b
^2*d^4*polylog(2,exp(I*(b*x+a)))*x^3+4*I/b^2*c^3*d*polylog(2,-exp(I*(b*x+a)))+24*d^4*polylog(5,-exp(I*(b*x+a))
)/b^5-24*d^4*polylog(5,exp(I*(b*x+a)))/b^5+12*I/b^2*c*d^3*polylog(2,-exp(I*(b*x+a)))*x^2-12*I/b^2*c*d^3*polylo
g(2,exp(I*(b*x+a)))*x^2-12*I/b^2*d^2*c^2*polylog(2,exp(I*(b*x+a)))*x+12*I/b^2*d^2*c^2*polylog(2,-exp(I*(b*x+a)
))*x+1/b*d^4*ln(1-exp(I*(b*x+a)))*x^4+12/b^3*d^2*c^2*polylog(3,exp(I*(b*x+a)))-12/b^3*d^2*c^2*polylog(3,-exp(I
*(b*x+a)))+12/b^3*d^4*polylog(3,exp(I*(b*x+a)))*x^2-12/b^3*d^4*polylog(3,-exp(I*(b*x+a)))*x^2+1/b^5*d^4*ln(exp
(I*(b*x+a))+1)*a^4-1/b^5*d^4*ln(1-exp(I*(b*x+a)))*a^4-2/b^5*d^4*a^4*arctanh(exp(I*(b*x+a)))-1/b*d^4*ln(exp(I*(
b*x+a))+1)*x^4+24/b^3*c*d^3*polylog(3,exp(I*(b*x+a)))*x+8/b^4*c*d^3*a^3*arctanh(exp(I*(b*x+a)))
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1367 vs. \(2 (305) = 610\).
Time = 0.33 (sec) , antiderivative size = 1367, normalized size of antiderivative = 4.11
\[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="fricas")
[Out]
-1/2*(24*d^4*polylog(5, cos(b*x + a) + I*sin(b*x + a)) + 24*d^4*polylog(5, cos(b*x + a) - I*sin(b*x + a)) - 24
*d^4*polylog(5, -cos(b*x + a) + I*sin(b*x + a)) - 24*d^4*polylog(5, -cos(b*x + a) - I*sin(b*x + a)) - 2*(b^4*d
^4*x^4 + 4*b^4*c*d^3*x^3 + b^4*c^4 - 12*b^2*c^2*d^2 + 24*d^4 + 6*(b^4*c^2*d^2 - 2*b^2*d^4)*x^2 + 4*(b^4*c^3*d
- 6*b^2*c*d^3)*x)*cos(b*x + a) + 4*(I*b^3*d^4*x^3 + 3*I*b^3*c*d^3*x^2 + 3*I*b^3*c^2*d^2*x + I*b^3*c^3*d)*dilog
(cos(b*x + a) + I*sin(b*x + a)) + 4*(-I*b^3*d^4*x^3 - 3*I*b^3*c*d^3*x^2 - 3*I*b^3*c^2*d^2*x - I*b^3*c^3*d)*dil
og(cos(b*x + a) - I*sin(b*x + a)) + 4*(I*b^3*d^4*x^3 + 3*I*b^3*c*d^3*x^2 + 3*I*b^3*c^2*d^2*x + I*b^3*c^3*d)*di
log(-cos(b*x + a) + I*sin(b*x + a)) + 4*(-I*b^3*d^4*x^3 - 3*I*b^3*c*d^3*x^2 - 3*I*b^3*c^2*d^2*x - I*b^3*c^3*d)
*dilog(-cos(b*x + a) - I*sin(b*x + a)) + (b^4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x +
b^4*c^4)*log(cos(b*x + a) + I*sin(b*x + a) + 1) + (b^4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c
^3*d*x + b^4*c^4)*log(cos(b*x + a) - I*sin(b*x + a) + 1) - (b^4*c^4 - 4*a*b^3*c^3*d + 6*a^2*b^2*c^2*d^2 - 4*a^
3*b*c*d^3 + a^4*d^4)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) - (b^4*c^4 - 4*a*b^3*c^3*d + 6*a^2*b^2*
c^2*d^2 - 4*a^3*b*c*d^3 + a^4*d^4)*log(-1/2*cos(b*x + a) - 1/2*I*sin(b*x + a) + 1/2) - (b^4*d^4*x^4 + 4*b^4*c*
d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x + 4*a*b^3*c^3*d - 6*a^2*b^2*c^2*d^2 + 4*a^3*b*c*d^3 - a^4*d^4)*log
(-cos(b*x + a) + I*sin(b*x + a) + 1) - (b^4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x + 4*
a*b^3*c^3*d - 6*a^2*b^2*c^2*d^2 + 4*a^3*b*c*d^3 - a^4*d^4)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) + 24*(-I*b*
d^4*x - I*b*c*d^3)*polylog(4, cos(b*x + a) + I*sin(b*x + a)) + 24*(I*b*d^4*x + I*b*c*d^3)*polylog(4, cos(b*x +
a) - I*sin(b*x + a)) + 24*(-I*b*d^4*x - I*b*c*d^3)*polylog(4, -cos(b*x + a) + I*sin(b*x + a)) + 24*(I*b*d^4*x
+ I*b*c*d^3)*polylog(4, -cos(b*x + a) - I*sin(b*x + a)) - 12*(b^2*d^4*x^2 + 2*b^2*c*d^3*x + b^2*c^2*d^2)*poly
log(3, cos(b*x + a) + I*sin(b*x + a)) - 12*(b^2*d^4*x^2 + 2*b^2*c*d^3*x + b^2*c^2*d^2)*polylog(3, cos(b*x + a)
- I*sin(b*x + a)) + 12*(b^2*d^4*x^2 + 2*b^2*c*d^3*x + b^2*c^2*d^2)*polylog(3, -cos(b*x + a) + I*sin(b*x + a))
+ 12*(b^2*d^4*x^2 + 2*b^2*c*d^3*x + b^2*c^2*d^2)*polylog(3, -cos(b*x + a) - I*sin(b*x + a)) + 8*(b^3*d^4*x^3
+ 3*b^3*c*d^3*x^2 + b^3*c^3*d - 6*b*c*d^3 + 3*(b^3*c^2*d^2 - 2*b*d^4)*x)*sin(b*x + a))/b^5
Sympy [F]
\[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int \left (c + d x\right )^{4} \cos {\left (a + b x \right )} \cot {\left (a + b x \right )}\, dx
\]
[In]
integrate((d*x+c)**4*cos(b*x+a)*cot(b*x+a),x)
[Out]
Integral((c + d*x)**4*cos(a + b*x)*cot(a + b*x), x)
Maxima [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1548 vs. \(2 (305) = 610\).
Time = 0.53 (sec) , antiderivative size = 1548, normalized size of antiderivative = 4.65
\[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="maxima")
[Out]
1/2*(c^4*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1)) - 4*a*c^3*d*(2*cos(b*x + a) - log(co
s(b*x + a) + 1) + log(cos(b*x + a) - 1))/b + 6*a^2*c^2*d^2*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b
*x + a) - 1))/b^2 - 4*a^3*c*d^3*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1))/b^3 + a^4*d^4
*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1))/b^4 + (48*d^4*polylog(5, -e^(I*b*x + I*a)) -
48*d^4*polylog(5, e^(I*b*x + I*a)) + 2*(-I*(b*x + a)^4*d^4 + 4*(-I*b*c*d^3 + I*a*d^4)*(b*x + a)^3 + 6*(-I*b^2
*c^2*d^2 + 2*I*a*b*c*d^3 - I*a^2*d^4)*(b*x + a)^2 + 4*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^2 - 3*I*a^2*b*c*d^3 + I*
a^3*d^4)*(b*x + a))*arctan2(sin(b*x + a), cos(b*x + a) + 1) + 2*(-I*(b*x + a)^4*d^4 + 4*(-I*b*c*d^3 + I*a*d^4)
*(b*x + a)^3 + 6*(-I*b^2*c^2*d^2 + 2*I*a*b*c*d^3 - I*a^2*d^4)*(b*x + a)^2 + 4*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^
2 - 3*I*a^2*b*c*d^3 + I*a^3*d^4)*(b*x + a))*arctan2(sin(b*x + a), -cos(b*x + a) + 1) + 2*((b*x + a)^4*d^4 - 12
*b^2*c^2*d^2 + 24*a*b*c*d^3 - 12*(a^2 - 2)*d^4 + 4*(b*c*d^3 - a*d^4)*(b*x + a)^3 + 6*(b^2*c^2*d^2 - 2*a*b*c*d^
3 + (a^2 - 2)*d^4)*(b*x + a)^2 + 4*(b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*(a^2 - 2)*b*c*d^3 - (a^3 - 6*a)*d^4)*(b*x
+ a))*cos(b*x + a) + 8*(I*b^3*c^3*d - 3*I*a*b^2*c^2*d^2 + 3*I*a^2*b*c*d^3 + I*(b*x + a)^3*d^4 - I*a^3*d^4 + 3*
(I*b*c*d^3 - I*a*d^4)*(b*x + a)^2 + 3*(I*b^2*c^2*d^2 - 2*I*a*b*c*d^3 + I*a^2*d^4)*(b*x + a))*dilog(-e^(I*b*x +
I*a)) + 8*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^2 - 3*I*a^2*b*c*d^3 - I*(b*x + a)^3*d^4 + I*a^3*d^4 + 3*(-I*b*c*d^3
+ I*a*d^4)*(b*x + a)^2 + 3*(-I*b^2*c^2*d^2 + 2*I*a*b*c*d^3 - I*a^2*d^4)*(b*x + a))*dilog(e^(I*b*x + I*a)) - (
(b*x + a)^4*d^4 + 4*(b*c*d^3 - a*d^4)*(b*x + a)^3 + 6*(b^2*c^2*d^2 - 2*a*b*c*d^3 + a^2*d^4)*(b*x + a)^2 + 4*(b
^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^3 - a^3*d^4)*(b*x + a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b
*x + a) + 1) + ((b*x + a)^4*d^4 + 4*(b*c*d^3 - a*d^4)*(b*x + a)^3 + 6*(b^2*c^2*d^2 - 2*a*b*c*d^3 + a^2*d^4)*(b
*x + a)^2 + 4*(b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^3 - a^3*d^4)*(b*x + a))*log(cos(b*x + a)^2 + sin(b*x
+ a)^2 - 2*cos(b*x + a) + 1) + 48*(-I*b*c*d^3 - I*(b*x + a)*d^4 + I*a*d^4)*polylog(4, -e^(I*b*x + I*a)) + 48*(
I*b*c*d^3 + I*(b*x + a)*d^4 - I*a*d^4)*polylog(4, e^(I*b*x + I*a)) - 24*(b^2*c^2*d^2 - 2*a*b*c*d^3 + (b*x + a)
^2*d^4 + a^2*d^4 + 2*(b*c*d^3 - a*d^4)*(b*x + a))*polylog(3, -e^(I*b*x + I*a)) + 24*(b^2*c^2*d^2 - 2*a*b*c*d^3
+ (b*x + a)^2*d^4 + a^2*d^4 + 2*(b*c*d^3 - a*d^4)*(b*x + a))*polylog(3, e^(I*b*x + I*a)) - 8*(b^3*c^3*d - 3*a
*b^2*c^2*d^2 + (b*x + a)^3*d^4 + 3*(a^2 - 2)*b*c*d^3 - (a^3 - 6*a)*d^4 + 3*(b*c*d^3 - a*d^4)*(b*x + a)^2 + 3*(
b^2*c^2*d^2 - 2*a*b*c*d^3 + (a^2 - 2)*d^4)*(b*x + a))*sin(b*x + a))/b^4)/b
Giac [F]
\[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int { {\left (d x + c\right )}^{4} \cos \left (b x + a\right ) \cot \left (b x + a\right ) \,d x }
\]
[In]
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="giac")
[Out]
integrate((d*x + c)^4*cos(b*x + a)*cot(b*x + a), x)
Mupad [F(-1)]
Timed out. \[
\int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int \cos \left (a+b\,x\right )\,\mathrm {cot}\left (a+b\,x\right )\,{\left (c+d\,x\right )}^4 \,d x
\]
[In]
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^4,x)
[Out]
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^4, x)